<?php
use entities\UserAccount;
use Doctrine\ORM\EntityRepository;
class AccountsRepository extends EntityRepository
{
	public function getUserAccounts(UserAccount $o_user)
	{
		//$o_user->getId();
		$arr_output = array();
		$s_query = 'SELECT a FROM entities\Account a WHERE a.user = :user';
		$arr_o_rs = $this->getEntityManager()->createQuery($s_query);
		$arr_o_rs->setParameter('user', $o_user);
		$arr_accounts = $arr_o_rs->getResult();
		return $arr_accounts;
	}
}